package com.ll.mapper;

import com.ll.pojo.DTO.DeleteRequest;
import com.ll.pojo.DTO.SearchUserDTO;
import com.ll.pojo.DTO.UserDTO;
import com.ll.pojo.DTO.UserLoginDTO;
import com.ll.pojo.entity.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper {

    /**
     * 登录
     * @param userLoginDTO
     * @return
     */
    @Select("select * from tb_admin where username=#{username} and password=#{password}")
    User login(UserLoginDTO userLoginDTO);

    /**
     * 获取用户信息
     * @return
     */
    List<User> getUserInfo(SearchUserDTO searchUserDTO);

    /**
     * 删除用户
     * @param userIds
     * @return
     */
    int deleteUser( List<Long> userIds);

    /**
     * 添加用户
     * @param user
     * @return
     */

    int addUser(User user);

    int updateUser(UserDTO userDTO);
}
